<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;"/>
        <meta charset="utf-8"/>
        <!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="dynsections.js"></script>
        <link rel="stylesheet" type="text/css" href="search/search.css" />
        <link rel="stylesheet" type="text/css" href="searchOverrides.css" />
        <script type="text/javascript" src="search/searchdata.js"></script>
        <script type="text/javascript" src="search/search.js"></script>
        <script type="text/javascript">
        /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
          $(document).ready(function() { init_search(); });
        /* @license-end */
        </script>
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">SFML 2.6.1</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classsf_1_1SoundSource-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">sf::SoundSource Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__audio.html">Audio module</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Base class defining a sound's properties.  
 <a href="classsf_1_1SoundSource.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="SoundSource_8hpp_source.html">SFML/Audio/SoundSource.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::SoundSource:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsf_1_1SoundSource.png" usemap="#sf::SoundSource_map" alt=""/>
  <map id="sf::SoundSource_map" name="sf::SoundSource_map">
<area href="classsf_1_1AlResource.html" title="Base class for classes that require an OpenAL context." alt="sf::AlResource" shape="rect" coords="57,0,162,24"/>
<area href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment." alt="sf::Sound" shape="rect" coords="0,112,105,136"/>
<area href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources." alt="sf::SoundStream" shape="rect" coords="115,112,220,136"/>
<area href="classsf_1_1Music.html" title="Streamed music played from an audio file." alt="sf::Music" shape="rect" coords="115,168,220,192"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ac43af72c98c077500b239bc75b812f03"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> { <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03adabb01e8aa85b2f54b344890addf764a">Stopped</a>
, <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03ac3ca1fcc0394267c9bdbe3dc0a8a7e41">Paused</a>
, <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03af07bdea9f70ef7606dfc9f955beeee18">Playing</a>
 }</td></tr>
<tr class="memdesc:ac43af72c98c077500b239bc75b812f03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration of the sound source states.  <a href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">More...</a><br /></td></tr>
<tr class="separator:ac43af72c98c077500b239bc75b812f03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae0c7728c1449fdebe65749ab6fcb3170"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#ae0c7728c1449fdebe65749ab6fcb3170">SoundSource</a> (const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &amp;copy)</td></tr>
<tr class="memdesc:ae0c7728c1449fdebe65749ab6fcb3170"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <br /></td></tr>
<tr class="separator:ae0c7728c1449fdebe65749ab6fcb3170"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77c7c1524f8cb81df2de9375b0f87c5c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a77c7c1524f8cb81df2de9375b0f87c5c">~SoundSource</a> ()</td></tr>
<tr class="memdesc:a77c7c1524f8cb81df2de9375b0f87c5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <br /></td></tr>
<tr class="separator:a77c7c1524f8cb81df2de9375b0f87c5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a72a13695ed48b7f7b55e7cd4431f4bb6">setPitch</a> (float pitch)</td></tr>
<tr class="memdesc:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the pitch of the sound.  <br /></td></tr>
<tr class="separator:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a2f192f2b49fb8e2b82f3498d3663fcc2">setVolume</a> (float volume)</td></tr>
<tr class="memdesc:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the volume of the sound.  <br /></td></tr>
<tr class="separator:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0480257ea25d986eba6cc3c1a6f8d7c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a0480257ea25d986eba6cc3c1a6f8d7c2">setPosition</a> (float x, float y, float z)</td></tr>
<tr class="memdesc:a0480257ea25d986eba6cc3c1a6f8d7c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the 3D position of the sound in the audio scene.  <br /></td></tr>
<tr class="separator:a0480257ea25d986eba6cc3c1a6f8d7c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17ba9ed01925395652181a7b2a7d3aef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a17ba9ed01925395652181a7b2a7d3aef">setPosition</a> (const <a class="el" href="classsf_1_1Vector3.html">Vector3f</a> &amp;position)</td></tr>
<tr class="memdesc:a17ba9ed01925395652181a7b2a7d3aef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the 3D position of the sound in the audio scene.  <br /></td></tr>
<tr class="separator:a17ba9ed01925395652181a7b2a7d3aef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac478a8b813faf7dd575635b102081d0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#ac478a8b813faf7dd575635b102081d0d">setRelativeToListener</a> (bool relative)</td></tr>
<tr class="memdesc:ac478a8b813faf7dd575635b102081d0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make the sound's position relative to the listener or absolute.  <br /></td></tr>
<tr class="separator:ac478a8b813faf7dd575635b102081d0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75bbc2c34addc8b25a14edb908508afe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe">setMinDistance</a> (float distance)</td></tr>
<tr class="memdesc:a75bbc2c34addc8b25a14edb908508afe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the minimum distance of the sound.  <br /></td></tr>
<tr class="separator:a75bbc2c34addc8b25a14edb908508afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626">setAttenuation</a> (float attenuation)</td></tr>
<tr class="memdesc:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the attenuation factor of the sound.  <br /></td></tr>
<tr class="separator:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4736acc2c802f927544c9ce52a44a9e4"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a4736acc2c802f927544c9ce52a44a9e4">getPitch</a> () const</td></tr>
<tr class="memdesc:a4736acc2c802f927544c9ce52a44a9e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the pitch of the sound.  <br /></td></tr>
<tr class="separator:a4736acc2c802f927544c9ce52a44a9e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04243fb5edf64561689b1d58953fc4ce"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a04243fb5edf64561689b1d58953fc4ce">getVolume</a> () const</td></tr>
<tr class="memdesc:a04243fb5edf64561689b1d58953fc4ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the volume of the sound.  <br /></td></tr>
<tr class="separator:a04243fb5edf64561689b1d58953fc4ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d199521f55550c7a3b2b0f6950dffa1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector3.html">Vector3f</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a8d199521f55550c7a3b2b0f6950dffa1">getPosition</a> () const</td></tr>
<tr class="memdesc:a8d199521f55550c7a3b2b0f6950dffa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the 3D position of the sound in the audio scene.  <br /></td></tr>
<tr class="separator:a8d199521f55550c7a3b2b0f6950dffa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#adcdb4ef32c2f4481d34aff0b5c31534b">isRelativeToListener</a> () const</td></tr>
<tr class="memdesc:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether the sound's position is relative to the listener or is absolute.  <br /></td></tr>
<tr class="separator:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a605ca7f359ec1c36fcccdcd4696562ac"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac">getMinDistance</a> () const</td></tr>
<tr class="memdesc:a605ca7f359ec1c36fcccdcd4696562ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the minimum distance of the sound.  <br /></td></tr>
<tr class="separator:a605ca7f359ec1c36fcccdcd4696562ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9">getAttenuation</a> () const</td></tr>
<tr class="memdesc:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the attenuation factor of the sound.  <br /></td></tr>
<tr class="separator:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b494e4a0b819bae9cd99b43e2f3f59d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a4b494e4a0b819bae9cd99b43e2f3f59d">operator=</a> (const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &amp;right)</td></tr>
<tr class="memdesc:a4b494e4a0b819bae9cd99b43e2f3f59d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overload of assignment operator.  <br /></td></tr>
<tr class="separator:a4b494e4a0b819bae9cd99b43e2f3f59d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e1bbb1f247ed8743faf3b1ed6f2bc21"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a6e1bbb1f247ed8743faf3b1ed6f2bc21">play</a> ()=0</td></tr>
<tr class="memdesc:a6e1bbb1f247ed8743faf3b1ed6f2bc21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or resume playing the sound source.  <br /></td></tr>
<tr class="separator:a6e1bbb1f247ed8743faf3b1ed6f2bc21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21553d4e8fcf136231dd8c7ad4630aba"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a21553d4e8fcf136231dd8c7ad4630aba">pause</a> ()=0</td></tr>
<tr class="memdesc:a21553d4e8fcf136231dd8c7ad4630aba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pause the sound source.  <br /></td></tr>
<tr class="separator:a21553d4e8fcf136231dd8c7ad4630aba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06501a25b12376befcc7ee1ed4865fda"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a06501a25b12376befcc7ee1ed4865fda">stop</a> ()=0</td></tr>
<tr class="memdesc:a06501a25b12376befcc7ee1ed4865fda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop playing the sound source.  <br /></td></tr>
<tr class="separator:a06501a25b12376befcc7ee1ed4865fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8d313c31b968159582a999aa66e5ed7"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#aa8d313c31b968159582a999aa66e5ed7">getStatus</a> () const</td></tr>
<tr class="memdesc:aa8d313c31b968159582a999aa66e5ed7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current status of the sound (stopped, paused, playing)  <br /></td></tr>
<tr class="separator:aa8d313c31b968159582a999aa66e5ed7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aefa4bd4460f387d81a0637d293979436"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#aefa4bd4460f387d81a0637d293979436">SoundSource</a> ()</td></tr>
<tr class="memdesc:aefa4bd4460f387d81a0637d293979436"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <br /></td></tr>
<tr class="separator:aefa4bd4460f387d81a0637d293979436"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0223cef4b1c587e6e1e17b4c92c4479c"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a0223cef4b1c587e6e1e17b4c92c4479c">m_source</a></td></tr>
<tr class="memdesc:a0223cef4b1c587e6e1e17b4c92c4479c"><td class="mdescLeft">&#160;</td><td class="mdescRight">OpenAL source identifier.  <br /></td></tr>
<tr class="separator:a0223cef4b1c587e6e1e17b4c92c4479c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class defining a sound's properties. </p>
<p><a class="el" href="classsf_1_1SoundSource.html" title="Base class defining a sound&#39;s properties.">sf::SoundSource</a> is not meant to be used directly, it only serves as a common base for all audio objects that can live in the audio environment.</p>
<p>It defines several properties for the sound: pitch, volume, position, attenuation, etc. All of them can be changed at any time with no impact on performances.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">sf::Sound</a>, <a class="el" href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources.">sf::SoundStream</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00042">42</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="ac43af72c98c077500b239bc75b812f03" name="ac43af72c98c077500b239bc75b812f03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac43af72c98c077500b239bc75b812f03">&#9670;&#160;</a></span>Status</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">sf::SoundSource::Status</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enumeration of the sound source states. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ac43af72c98c077500b239bc75b812f03adabb01e8aa85b2f54b344890addf764a" name="ac43af72c98c077500b239bc75b812f03adabb01e8aa85b2f54b344890addf764a"></a>Stopped&#160;</td><td class="fielddoc"><p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> is not playing. </p>
</td></tr>
<tr><td class="fieldname"><a id="ac43af72c98c077500b239bc75b812f03ac3ca1fcc0394267c9bdbe3dc0a8a7e41" name="ac43af72c98c077500b239bc75b812f03ac3ca1fcc0394267c9bdbe3dc0a8a7e41"></a>Paused&#160;</td><td class="fielddoc"><p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> is paused. </p>
</td></tr>
<tr><td class="fieldname"><a id="ac43af72c98c077500b239bc75b812f03af07bdea9f70ef7606dfc9f955beeee18" name="ac43af72c98c077500b239bc75b812f03af07bdea9f70ef7606dfc9f955beeee18"></a>Playing&#160;</td><td class="fielddoc"><p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> is playing. </p>
</td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00050">50</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae0c7728c1449fdebe65749ab6fcb3170" name="ae0c7728c1449fdebe65749ab6fcb3170"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0c7728c1449fdebe65749ab6fcb3170">&#9670;&#160;</a></span>SoundSource() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::SoundSource::SoundSource </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &amp;&#160;</td>
          <td class="paramname"><em>copy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">copy</td><td>Instance to copy </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a77c7c1524f8cb81df2de9375b0f87c5c" name="a77c7c1524f8cb81df2de9375b0f87c5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77c7c1524f8cb81df2de9375b0f87c5c">&#9670;&#160;</a></span>~SoundSource()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual sf::SoundSource::~SoundSource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<a id="aefa4bd4460f387d81a0637d293979436" name="aefa4bd4460f387d81a0637d293979436"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aefa4bd4460f387d81a0637d293979436">&#9670;&#160;</a></span>SoundSource() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sf::SoundSource::SoundSource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>This constructor is meant to be called by derived classes only. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8ad7dafb4f1b4afbc638cebe24f48cc9" name="a8ad7dafb4f1b4afbc638cebe24f48cc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ad7dafb4f1b4afbc638cebe24f48cc9">&#9670;&#160;</a></span>getAttenuation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::SoundSource::getAttenuation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the attenuation factor of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Attenuation factor of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a>, <a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound.">getMinDistance</a> </dd></dl>

</div>
</div>
<a id="a605ca7f359ec1c36fcccdcd4696562ac" name="a605ca7f359ec1c36fcccdcd4696562ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a605ca7f359ec1c36fcccdcd4696562ac">&#9670;&#160;</a></span>getMinDistance()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::SoundSource::getMinDistance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the minimum distance of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Minimum distance of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound.">setMinDistance</a>, <a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a> </dd></dl>

</div>
</div>
<a id="a4736acc2c802f927544c9ce52a44a9e4" name="a4736acc2c802f927544c9ce52a44a9e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4736acc2c802f927544c9ce52a44a9e4">&#9670;&#160;</a></span>getPitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::SoundSource::getPitch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the pitch of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Pitch of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a72a13695ed48b7f7b55e7cd4431f4bb6" title="Set the pitch of the sound.">setPitch</a> </dd></dl>

</div>
</div>
<a id="a8d199521f55550c7a3b2b0f6950dffa1" name="a8d199521f55550c7a3b2b0f6950dffa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d199521f55550c7a3b2b0f6950dffa1">&#9670;&#160;</a></span>getPosition()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1Vector3.html">Vector3f</a> sf::SoundSource::getPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the 3D position of the sound in the audio scene. </p>
<dl class="section return"><dt>Returns</dt><dd>Position of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a0480257ea25d986eba6cc3c1a6f8d7c2" title="Set the 3D position of the sound in the audio scene.">setPosition</a> </dd></dl>

</div>
</div>
<a id="aa8d313c31b968159582a999aa66e5ed7" name="aa8d313c31b968159582a999aa66e5ed7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8d313c31b968159582a999aa66e5ed7">&#9670;&#160;</a></span>getStatus()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> sf::SoundSource::getStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the current status of the sound (stopped, paused, playing) </p>
<dl class="section return"><dt>Returns</dt><dd>Current status of the sound </dd></dl>

<p>Reimplemented in <a class="el" href="classsf_1_1Sound.html#a406fc363594a7718a53ebef49a870f51">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a64a8193ed728da37c115c65de015849f">sf::SoundStream</a>.</p>

</div>
</div>
<a id="a04243fb5edf64561689b1d58953fc4ce" name="a04243fb5edf64561689b1d58953fc4ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04243fb5edf64561689b1d58953fc4ce">&#9670;&#160;</a></span>getVolume()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::SoundSource::getVolume </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the volume of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Volume of the sound, in the range [0, 100]</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a2f192f2b49fb8e2b82f3498d3663fcc2" title="Set the volume of the sound.">setVolume</a> </dd></dl>

</div>
</div>
<a id="adcdb4ef32c2f4481d34aff0b5c31534b" name="adcdb4ef32c2f4481d34aff0b5c31534b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcdb4ef32c2f4481d34aff0b5c31534b">&#9670;&#160;</a></span>isRelativeToListener()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool sf::SoundSource::isRelativeToListener </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tell whether the sound's position is relative to the listener or is absolute. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the position is relative, false if it's absolute</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#ac478a8b813faf7dd575635b102081d0d" title="Make the sound&#39;s position relative to the listener or absolute.">setRelativeToListener</a> </dd></dl>

</div>
</div>
<a id="a4b494e4a0b819bae9cd99b43e2f3f59d" name="a4b494e4a0b819bae9cd99b43e2f3f59d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b494e4a0b819bae9cd99b43e2f3f59d">&#9670;&#160;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &amp; sf::SoundSource::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &amp;&#160;</td>
          <td class="paramname"><em>right</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Overload of assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">right</td><td>Instance to assign</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to self </dd></dl>

</div>
</div>
<a id="a21553d4e8fcf136231dd8c7ad4630aba" name="a21553d4e8fcf136231dd8c7ad4630aba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21553d4e8fcf136231dd8c7ad4630aba">&#9670;&#160;</a></span>pause()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sf::SoundSource::pause </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pause the sound source. </p>
<p>This function pauses the source if it was playing, otherwise (source already paused or stopped) it has no effect.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a6e1bbb1f247ed8743faf3b1ed6f2bc21" title="Start or resume playing the sound source.">play</a>, <a class="el" href="classsf_1_1SoundSource.html#a06501a25b12376befcc7ee1ed4865fda" title="Stop playing the sound source.">stop</a> </dd></dl>

<p>Implemented in <a class="el" href="classsf_1_1Sound.html#a5eeb25815bfa8cdc4a6cc000b7b19ad5">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca">sf::SoundStream</a>.</p>

</div>
</div>
<a id="a6e1bbb1f247ed8743faf3b1ed6f2bc21" name="a6e1bbb1f247ed8743faf3b1ed6f2bc21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e1bbb1f247ed8743faf3b1ed6f2bc21">&#9670;&#160;</a></span>play()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sf::SoundSource::play </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Start or resume playing the sound source. </p>
<p>This function starts the source if it was stopped, resumes it if it was paused, and restarts it from the beginning if it was already playing.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a21553d4e8fcf136231dd8c7ad4630aba" title="Pause the sound source.">pause</a>, <a class="el" href="classsf_1_1SoundSource.html#a06501a25b12376befcc7ee1ed4865fda" title="Stop playing the sound source.">stop</a> </dd></dl>

<p>Implemented in <a class="el" href="classsf_1_1Sound.html#a2953ffe632536e72e696fd880ced2532">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144">sf::SoundStream</a>.</p>

</div>
</div>
<a id="aa2adff44cd2f8b4e3c7315d7c2a45626" name="aa2adff44cd2f8b4e3c7315d7c2a45626"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2adff44cd2f8b4e3c7315d7c2a45626">&#9670;&#160;</a></span>setAttenuation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setAttenuation </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>attenuation</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the attenuation factor of the sound. </p>
<p>The attenuation is a multiplicative factor which makes the sound more or less loud according to its distance from the listener. An attenuation of 0 will produce a non-attenuated sound, i.e. its volume will always be the same whether it is heard from near or from far. On the other hand, an attenuation value such as 100 will make the sound fade out very quickly as it gets further from the listener. The default value of the attenuation is 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">attenuation</td><td>New attenuation factor of the sound</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a>, <a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound.">setMinDistance</a> </dd></dl>

</div>
</div>
<a id="a75bbc2c34addc8b25a14edb908508afe" name="a75bbc2c34addc8b25a14edb908508afe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75bbc2c34addc8b25a14edb908508afe">&#9670;&#160;</a></span>setMinDistance()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setMinDistance </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>distance</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the minimum distance of the sound. </p>
<p>The "minimum distance" of a sound is the maximum distance at which it is heard at its maximum volume. Further than the minimum distance, it will start to fade out according to its attenuation factor. A value of 0 ("inside the head
of the listener") is an invalid value and is forbidden. The default value of the minimum distance is 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">distance</td><td>New minimum distance of the sound</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound.">getMinDistance</a>, <a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a> </dd></dl>

</div>
</div>
<a id="a72a13695ed48b7f7b55e7cd4431f4bb6" name="a72a13695ed48b7f7b55e7cd4431f4bb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72a13695ed48b7f7b55e7cd4431f4bb6">&#9670;&#160;</a></span>setPitch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setPitch </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>pitch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the pitch of the sound. </p>
<p>The pitch represents the perceived fundamental frequency of a sound; thus you can make a sound more acute or grave by changing its pitch. A side effect of changing the pitch is to modify the playing speed of the sound as well. The default value for the pitch is 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pitch</td><td>New pitch to apply to the sound</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a4736acc2c802f927544c9ce52a44a9e4" title="Get the pitch of the sound.">getPitch</a> </dd></dl>

</div>
</div>
<a id="a17ba9ed01925395652181a7b2a7d3aef" name="a17ba9ed01925395652181a7b2a7d3aef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17ba9ed01925395652181a7b2a7d3aef">&#9670;&#160;</a></span>setPosition() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setPosition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector3.html">Vector3f</a> &amp;&#160;</td>
          <td class="paramname"><em>position</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the 3D position of the sound in the audio scene. </p>
<p>Only sounds with one channel (mono sounds) can be spatialized. The default position of a sound is (0, 0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">position</td><td>Position of the sound in the scene</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a8d199521f55550c7a3b2b0f6950dffa1" title="Get the 3D position of the sound in the audio scene.">getPosition</a> </dd></dl>

</div>
</div>
<a id="a0480257ea25d986eba6cc3c1a6f8d7c2" name="a0480257ea25d986eba6cc3c1a6f8d7c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0480257ea25d986eba6cc3c1a6f8d7c2">&#9670;&#160;</a></span>setPosition() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setPosition </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the 3D position of the sound in the audio scene. </p>
<p>Only sounds with one channel (mono sounds) can be spatialized. The default position of a sound is (0, 0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X coordinate of the position of the sound in the scene </td></tr>
    <tr><td class="paramname">y</td><td>Y coordinate of the position of the sound in the scene </td></tr>
    <tr><td class="paramname">z</td><td>Z coordinate of the position of the sound in the scene</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a8d199521f55550c7a3b2b0f6950dffa1" title="Get the 3D position of the sound in the audio scene.">getPosition</a> </dd></dl>

</div>
</div>
<a id="ac478a8b813faf7dd575635b102081d0d" name="ac478a8b813faf7dd575635b102081d0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac478a8b813faf7dd575635b102081d0d">&#9670;&#160;</a></span>setRelativeToListener()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setRelativeToListener </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>relative</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Make the sound's position relative to the listener or absolute. </p>
<p>Making a sound relative to the listener will ensure that it will always be played the same way regardless of the position of the listener. This can be useful for non-spatialized sounds, sounds that are produced by the listener, or sounds attached to it. The default value is false (position is absolute).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">relative</td><td>True to set the position relative, false to set it absolute</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#adcdb4ef32c2f4481d34aff0b5c31534b" title="Tell whether the sound&#39;s position is relative to the listener or is absolute.">isRelativeToListener</a> </dd></dl>

</div>
</div>
<a id="a2f192f2b49fb8e2b82f3498d3663fcc2" name="a2f192f2b49fb8e2b82f3498d3663fcc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f192f2b49fb8e2b82f3498d3663fcc2">&#9670;&#160;</a></span>setVolume()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::SoundSource::setVolume </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>volume</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the volume of the sound. </p>
<p>The volume is a value between 0 (mute) and 100 (full volume). The default value for the volume is 100.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>Volume of the sound</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a04243fb5edf64561689b1d58953fc4ce" title="Get the volume of the sound.">getVolume</a> </dd></dl>

</div>
</div>
<a id="a06501a25b12376befcc7ee1ed4865fda" name="a06501a25b12376befcc7ee1ed4865fda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06501a25b12376befcc7ee1ed4865fda">&#9670;&#160;</a></span>stop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sf::SoundSource::stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stop playing the sound source. </p>
<p>This function stops the source if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike <a class="el" href="classsf_1_1SoundSource.html#a21553d4e8fcf136231dd8c7ad4630aba" title="Pause the sound source.">pause()</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a6e1bbb1f247ed8743faf3b1ed6f2bc21" title="Start or resume playing the sound source.">play</a>, <a class="el" href="classsf_1_1SoundSource.html#a21553d4e8fcf136231dd8c7ad4630aba" title="Pause the sound source.">pause</a> </dd></dl>

<p>Implemented in <a class="el" href="classsf_1_1Sound.html#aa9c91c34f7c6d344d5ee9b997511f754">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4">sf::SoundStream</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a0223cef4b1c587e6e1e17b4c92c4479c" name="a0223cef4b1c587e6e1e17b4c92c4479c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0223cef4b1c587e6e1e17b4c92c4479c">&#9670;&#160;</a></span>m_source</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int sf::SoundSource::m_source</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>OpenAL source identifier. </p>

<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00309">309</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a></li>
</ul>
</div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
                Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>
